home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / utils1 / fip09.arj / SOURCE.ZIP / FAT.H < prev    next >
C/C++ Source or Header  |  1993-11-17  |  2KB  |  65 lines

  1. /*
  2.     FIPS - the First nondestructive Interactive Partition Splitting program
  3.  
  4.     Module fat.h
  5.  
  6.     RCS - Header:
  7.     $Header: c:/daten/c/fips/source/cpp/RCS/fat.h 0.9.1.1 1993/11/17 17:52:28 schaefer Exp schaefer $
  8.  
  9.     Copyright (C) 1993 Arno Schaefer
  10.  
  11.     This program is free software; you can redistribute it and/or modify
  12.     it under the terms of the GNU General Public License as published by
  13.     the Free Software Foundation; either version 2 of the License, or
  14.     (at your option) any later version.
  15.  
  16.     This program is distributed in the hope that it will be useful,
  17.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.     GNU General Public License for more details.
  20.  
  21.     You should have received a copy of the GNU General Public License
  22.     along with this program; if not, write to the Free Software
  23.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24.  
  25.  
  26.     Report problems and direct all questions to:
  27.  
  28.     schaefer@rbg.informatik.th-darmstadt.de
  29. */
  30.  
  31. #ifndef FAT_H
  32. #define FAT_H
  33.  
  34. #include "types.h"
  35. #include "disk_io.h"
  36. #include "logdr_st.h"
  37.  
  38. class fat
  39. {
  40. protected:
  41.     logical_drive *logical_drive;
  42.     int number;
  43.     dword start_sector;
  44.     sector *buffer;
  45.     dword sector_in_buffer;
  46.     void read_sector (dword sector);
  47. public:
  48.     virtual dword next_cluster (dword cluster_number) = 0;
  49.  
  50.     fat (class logical_drive *logical_drive,int number);
  51.     ~fat (void) { delete buffer; }
  52. };
  53.  
  54. class fat16:public fat
  55. {
  56. public:
  57.     dword next_cluster (dword cluster_number);
  58.     void check_empty (dword new_start_cluster);
  59.     void check_against (class fat16 *fat2);
  60.  
  61.     fat16 (class logical_drive *logical_drive,int number):fat (logical_drive,number) {}
  62. };
  63.  
  64. #endif
  65.